package com.mammoth.Bodybuilding.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 
 * @title : Store
 * @description : 门店表
 * @company : com.mammoth.Bodybuilding.entity
 * @project Mammoth
 * @author xingzhaojun
 * @date 2018年4月24日 下午10:35:50
 */
@Entity
@Table(name = "MAMMOTH_BODYBUILDING_STORE")
public class Store implements Serializable {

	/**
	 * 序列号
	 */
	private static final long serialVersionUID = -4499543097461227122L;
	/** 主键序号 **/
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	/** 门店名称 **/
	private String storeName;
	/** 门店首页图片 **/
	@OneToOne
	private PictureObj firstIMG;
	/** 图片集 **/
	@OneToMany(targetEntity=PictureObj.class)
	private List<PictureObj> pictures;
	/** 省份 **/
	@OneToOne
	private RegionObj province;
	/** 城市 **/
	@OneToOne
	private RegionObj city;
	/** 区域 **/
	@OneToOne
	private RegionObj area;
	/** 详细地址 **/
	private String detailedAddress;
	/** 场馆面积 **/
	private Double siteArea;
	/** 场地数量 **/
	private Long siteNum;
	/** 私教区面积 **/
	private Long privateTeachArea;
	/** 器械 **/
	@OneToMany(targetEntity=PowerApparatus.class)
	private List<PowerApparatus> apparatus;
	/** 扩展字段1 **/
	private String ext1;
	/** 扩展字段2 **/
	private String ext2;
	/** 扩展字段3 **/
	private String ext3;
	/** 扩展字段4 **/
	private String ext4;
	/** 扩展字段5 **/
	private String ext5;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getStoreName() {
		return storeName;
	}

	public void setStoreName(String storeName) {
		this.storeName = storeName;
	}

	public PictureObj getFirstIMG() {
		return firstIMG;
	}

	public void setFirstIMG(PictureObj firstIMG) {
		this.firstIMG = firstIMG;
	}

	public List<PictureObj> getPictures() {
		return pictures;
	}

	public void setPictures(List<PictureObj> pictures) {
		this.pictures = pictures;
	}

	public RegionObj getProvince() {
		return province;
	}

	public void setProvince(RegionObj province) {
		this.province = province;
	}

	public RegionObj getCity() {
		return city;
	}

	public void setCity(RegionObj city) {
		this.city = city;
	}

	public RegionObj getArea() {
		return area;
	}

	public void setArea(RegionObj area) {
		this.area = area;
	}

	public String getDetailedAddress() {
		return detailedAddress;
	}

	public void setDetailedAddress(String detailedAddress) {
		this.detailedAddress = detailedAddress;
	}

	public Double getSiteArea() {
		return siteArea;
	}

	public void setSiteArea(Double siteArea) {
		this.siteArea = siteArea;
	}

	public Long getSiteNum() {
		return siteNum;
	}

	public void setSiteNum(Long siteNum) {
		this.siteNum = siteNum;
	}

	public Long getPrivateTeachArea() {
		return privateTeachArea;
	}

	public void setPrivateTeachArea(Long privateTeachArea) {
		this.privateTeachArea = privateTeachArea;
	}

	public List<PowerApparatus> getApparatus() {
		return apparatus;
	}

	public void setApparatus(List<PowerApparatus> apparatus) {
		this.apparatus = apparatus;
	}

	public String getExt1() {
		return ext1;
	}

	public void setExt1(String ext1) {
		this.ext1 = ext1;
	}

	public String getExt2() {
		return ext2;
	}

	public void setExt2(String ext2) {
		this.ext2 = ext2;
	}

	public String getExt3() {
		return ext3;
	}

	public void setExt3(String ext3) {
		this.ext3 = ext3;
	}

	public String getExt4() {
		return ext4;
	}

	public void setExt4(String ext4) {
		this.ext4 = ext4;
	}

	public String getExt5() {
		return ext5;
	}

	public void setExt5(String ext5) {
		this.ext5 = ext5;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((apparatus == null) ? 0 : apparatus.hashCode());
		result = prime * result + ((area == null) ? 0 : area.hashCode());
		result = prime * result + ((city == null) ? 0 : city.hashCode());
		result = prime * result + ((detailedAddress == null) ? 0 : detailedAddress.hashCode());
		result = prime * result + ((ext1 == null) ? 0 : ext1.hashCode());
		result = prime * result + ((ext2 == null) ? 0 : ext2.hashCode());
		result = prime * result + ((ext3 == null) ? 0 : ext3.hashCode());
		result = prime * result + ((ext4 == null) ? 0 : ext4.hashCode());
		result = prime * result + ((ext5 == null) ? 0 : ext5.hashCode());
		result = prime * result + ((firstIMG == null) ? 0 : firstIMG.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((pictures == null) ? 0 : pictures.hashCode());
		result = prime * result + ((privateTeachArea == null) ? 0 : privateTeachArea.hashCode());
		result = prime * result + ((province == null) ? 0 : province.hashCode());
		result = prime * result + ((siteArea == null) ? 0 : siteArea.hashCode());
		result = prime * result + ((siteNum == null) ? 0 : siteNum.hashCode());
		result = prime * result + ((storeName == null) ? 0 : storeName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Store other = (Store) obj;
		if (apparatus == null) {
			if (other.apparatus != null)
				return false;
		} else if (!apparatus.equals(other.apparatus))
			return false;
		if (area == null) {
			if (other.area != null)
				return false;
		} else if (!area.equals(other.area))
			return false;
		if (city == null) {
			if (other.city != null)
				return false;
		} else if (!city.equals(other.city))
			return false;
		if (detailedAddress == null) {
			if (other.detailedAddress != null)
				return false;
		} else if (!detailedAddress.equals(other.detailedAddress))
			return false;
		if (ext1 == null) {
			if (other.ext1 != null)
				return false;
		} else if (!ext1.equals(other.ext1))
			return false;
		if (ext2 == null) {
			if (other.ext2 != null)
				return false;
		} else if (!ext2.equals(other.ext2))
			return false;
		if (ext3 == null) {
			if (other.ext3 != null)
				return false;
		} else if (!ext3.equals(other.ext3))
			return false;
		if (ext4 == null) {
			if (other.ext4 != null)
				return false;
		} else if (!ext4.equals(other.ext4))
			return false;
		if (ext5 == null) {
			if (other.ext5 != null)
				return false;
		} else if (!ext5.equals(other.ext5))
			return false;
		if (firstIMG == null) {
			if (other.firstIMG != null)
				return false;
		} else if (!firstIMG.equals(other.firstIMG))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (pictures == null) {
			if (other.pictures != null)
				return false;
		} else if (!pictures.equals(other.pictures))
			return false;
		if (privateTeachArea == null) {
			if (other.privateTeachArea != null)
				return false;
		} else if (!privateTeachArea.equals(other.privateTeachArea))
			return false;
		if (province == null) {
			if (other.province != null)
				return false;
		} else if (!province.equals(other.province))
			return false;
		if (siteArea == null) {
			if (other.siteArea != null)
				return false;
		} else if (!siteArea.equals(other.siteArea))
			return false;
		if (siteNum == null) {
			if (other.siteNum != null)
				return false;
		} else if (!siteNum.equals(other.siteNum))
			return false;
		if (storeName == null) {
			if (other.storeName != null)
				return false;
		} else if (!storeName.equals(other.storeName))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Store [id=" + id + ", storeName=" + storeName + ", firstIMG=" + firstIMG + ", pictures=" + pictures
				+ ", province=" + province + ", city=" + city + ", area=" + area + ", detailedAddress="
				+ detailedAddress + ", siteArea=" + siteArea + ", siteNum=" + siteNum + ", privateTeachArea="
				+ privateTeachArea + ", apparatus=" + apparatus + ", ext1=" + ext1 + ", ext2=" + ext2 + ", ext3=" + ext3
				+ ", ext4=" + ext4 + ", ext5=" + ext5 + "]";
	}

}
